home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
strip.z
/
strip
Wrap
Text File
|
1998-10-30
|
8KB
|
199 lines
SSSSTTTTRRRRIIIIPPPP((((1111)))) SSSSTTTTRRRRIIIIPPPP((((1111))))
NNNNAAAAMMMMEEEE
strip - remove symbols and relocation bits
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ssssttttrrrriiiipppp [ ----bbbb ----ffff ----hhhh ----uuuu ----llll ----oooo_o_u_t_f_i_l_e ----rrrr ----ssss ----SSSS ----VVVV ----xxxx ] name ...
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The _s_t_r_i_p command removes the symbol table (the section named ".symtab",
Elf section kind SHT_SYMTAB) and relocation bits ordinarily attached to
the output of the assembler and loader. This is useful to save space
after a program has been debugged.
Unless option -_f is given, only objects marked with ELF type ET_EXEC (the
type given to main programs) are stripped. See /_u_s_r/_i_n_c_l_u_d_e/_e_l_f._h for
the type codes.
The effect of the default _s_t_r_i_p is similar to use of the ----ssss option of _l_d.
_S_t_r_i_p recognizes the following options:
----bbbb Same effect as the default behavior. This option, though
accepted, is obsolete.
----ffff Allows stripping information from any ELF file (including
relocatable object files and Dynamic Shared Objects) and any
ELF file inside an archive.
----hhhh Removes symbol names from SHT_DYNSYM and/or SHT_SYMTAB section
symbol entries marked STO_HIDDEN or STO_INTERNAL. Makes
strings in certain string tables into all zeros. (Symbols may
be marked STO_HIDDEN or STO_INTERNAL by the _l_d(1) options
-_h_i_d_d_e_n__s_y_m_b_o_l or -_h_i_d_e_s__f_i_l_e.) This option saves no space in
the object, so there is no point to using it on most ELF files.
----llll Strips line number information only from -n32 or -64 object
files. Doesn't strip the ELF symbol table or debugging
information other than the line number information. Does
nothing on -32 object files.
----oooo _o_u_t_f_i_l_e
Specifies a name for the output file. It is a mistake to
specify more than one _n_a_m_e to strip, since only one stripped
outputfile is created if ----oooo _o_u_t_f_i_l_e is specified. The output
file is created with mode 0644.
----uuuu When combined with -o, the new output file has the current user
ID and group ID. By default (without -u) -o applies the user
ID and group ID of the input file to the output file. Ignored
if -o not supplied.
PPPPaaaaggggeeee 1111
SSSSTTTTRRRRIIIIPPPP((((1111)))) SSSSTTTTRRRRIIIIPPPP((((1111))))
----rrrr Same effect as the default behavior. This option, though
accepted, is obsolete.
----ssss Strips some sections beyond the default strippable set.
_p_i_x_i_e,_c_o_r_d, and some other object tools cannot be used on a dso
or a.out with these additional sections stripped. This is
intended for standalone programs (for which the space savings
is more important than the ability to use object tools on the
resulting file).
----kkkk When used with ----ssss this adds the .debug_frame section to the
list of sections stripped. This option is not relevant for
old-32bit ABI objects. When used without ----ssss the ----kkkk option does
nothing at all. If the .debug_frame section (which only
appears in n32 and 64 ABI objects) is stripped from an
executable or DSO or object then C++ exception handling may
silently work incorrectly. It is extremely unwise to use ----kkkk on
any DSO (though if the DSO is never in use with C++ exceptions
there is no harm in removing .debug_frame, how can one be sure
that the DSO won't be used with C++ exceptions?). Use ----kkkk on an
executable only if a) space saving on disk is of paramount
importance and b) you know that no C++ exceptions can occur in
the application (and preferably none can occur in any DSO it
calls (directly or indirectly)).
----SSSS Suppress all messages (run silently).
----VVVV Prints, on _s_t_d_e_r_r, the version number of _s_t_r_i_p.
----xxxx Turns off stripping the ELF ".symtab" (SHT_SYMTAB) symbol table
section from the object.
FFFFIIIILLLLEEEESSSS
strp1_x_x_x_x_x
strp2_x_x_x_x_x
/usr/tmp/strp1_x_x_x_x_x
/usr/tmp/strp2_x_x_x_x_x
where xxxxx is a suffix created by _t_e_m_p_n_a_m(_3_S).
SSSSEEEEEEEE AAAALLLLSSSSOOOO
ld(1), pixie(1), tempnam(3S), cord(1)
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
_s_t_r_i_p returns 0 to the environment if there are no errors. In case of
any error, a non-zero value is returned to the environment with _e_x_i_t (_3).
NNNNOOOOTTTTEEEESSSS
The ----bbbb and ----rrrr options have no effect other than printing a warning.
These options will be removed in a future release.
PPPPaaaaggggeeee 2222
SSSSTTTTRRRRIIIIPPPP((((1111)))) SSSSTTTTRRRRIIIIPPPP((((1111))))
Temporary files are created during execution. Up to three times the space
of each original file being stripped may be needed while the program is
in operation. Temporary files may be created in /_u_s_r/_t_m_p and in the
directory given on the command line (if no directory is specified in the
file pathname the current directory is assumed). If the command is strip
/a/b/c then the directory /_a/_b must have permissions to allow file
creation, writing, and reading. Whether /_a/_b/_c is a file (with or
without multiple links) or a symbolic link to a file, the directory /_a/_b
must allow file creation, writing, and reading. If /_a/_b/_c is a symbolic
link then the true directory of the real file (which could be on a
different machine or filesystem than /_a/_b) must also allow file creation,
writing, and reading.
The ----ssss option removes the line-table section removed by the ----llll option so
using both is just like using the ----ssss option without using the ----llll option.
PPPPaaaaggggeeee 3333